package br.edu.ufcg.lsd.wbis.control.equipment;

import java.sql.Date;

import javax.persistence.Entity;

/**
 * 
 * @author Paulo Ricardo
 *
 */
@Entity
public class DiscDriver extends Component {

	public boolean external;
	public boolean recorder;
	public String mediaTypes;
	
	@SuppressWarnings("unused")
	private DiscDriver() {}


	/**
	 * 
	 * @param inventoryCode
	 * @param brand
	 * @param serialCode
	 * @param aquisitionDate
	 * @param model
	 * @param localization
	 * @param receipt
	 * @param alocable
	 * @param available
	 * @param coupled
	 * @param external
	 * @param recorder
	 * @param mediaTypes
	 */
	public DiscDriver(String inventoryCode, String brand, String serialCode,
			Date aquisitionDate, String model, String localization,
			byte[] receipt, Computer computer, boolean alocable, boolean available,
			boolean external, boolean recorder, String mediaTypes) {
		super(inventoryCode, brand, serialCode, aquisitionDate, model,
				localization, receipt, computer, false, available, DiscDriver.class);
		this.external = external;
		this.recorder = recorder;
		this.mediaTypes = mediaTypes;
		if(external){
			this.setAlocable(alocable);
		}
	}


	/**
	 * 
	 * @param external
	 */
	protected void setExternal(boolean external) {
		this.external = external;
	}


	/**
	 * 
	 * @param recorder
	 */
	protected void setRecorder(boolean recorder) {
		this.recorder = recorder;
	}


	/**
	 * 
	 * @param mediaTypes
	 */
	protected void setMediaTypes(String mediaTypes) {
		this.mediaTypes = mediaTypes;
	}


	/**
	 * 
	 * @return
	 */
	public boolean isExternal() {
		return external;
	}

	/**
	 * 
	 * @return
	 */
	public boolean isRecorder() {
		return recorder;
	}

	/**
	 * 
	 * @return
	 */
	public String getMediaTypes() {
		return mediaTypes;
	}


}
